<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"
  template="/WEB-INF/template/template.xhtml">

  <ui:define name="page_title">#{msgs['jsf.Error']}</ui:define>
  <ui:param name="showGlobalMessages" value="false"/>
  <ui:define name="center_content">
    <ui:remove>
      <!-- TODO [CDI] use h:messages instead of jsfMessages.globalMessagesList? -->
    </ui:remove>
    <ui:fragment
      rendered="#{empty jsfMessages.globalMessagesList}">
      <h2>#{msgs['jsf.NoErrors']}</h2>
    </ui:fragment>

    <ui:fragment
      rendered="#{not empty jsfMessages.globalMessagesList}">
      <ul class="list--no-bullets">
        <li>
          <div class="alert--danger">
            <h2 class="alert__heading">#{msgs['jsf.ErrorTitle']}</h2>

            <div class="alert__content">
              <ul class="list--no-bullets">
                <ui:repeat
                  value="#{jsfMessages.globalMessagesList}"
                  var="message">
                  <h:outputText
                    value="#{message.detail}">
                  </h:outputText>

                </ui:repeat>
              </ul>
            </div>
          </div>
        </li>
      </ul>
    </ui:fragment>
  </ui:define>
</ui:composition>
